package com.ruoyi.front.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.front.mapper.LawyerTeamMapper;
import com.ruoyi.front.domain.LawyerTeam;
import com.ruoyi.front.service.ILawyerTeamService;
import com.ruoyi.common.core.text.Convert;

/**
 * 律师Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-11-07
 */
@Service
public class LawyerTeamServiceImpl implements ILawyerTeamService 
{
    @Autowired
    private LawyerTeamMapper lawyerTeamMapper;

    /**
     * 查询律师
     * 
     * @param id 律师ID
     * @return 律师
     */
    @Override
    public LawyerTeam selectLawyerTeamById(Long id)
    {
        return lawyerTeamMapper.selectLawyerTeamById(id);
    }

    /**
     * 查询律师列表
     * 
     * @param lawyerTeam 律师
     * @return 律师
     */
    @Override
    public List<LawyerTeam> selectLawyerTeamList(LawyerTeam lawyerTeam)
    {
        return lawyerTeamMapper.selectLawyerTeamList(lawyerTeam);
    }

    /**
     * 新增律师
     * 
     * @param lawyerTeam 律师
     * @return 结果
     */
    @Override
    public int insertLawyerTeam(LawyerTeam lawyerTeam)
    {
        lawyerTeam.setCreateTime(DateUtils.getNowDate());
        return lawyerTeamMapper.insertLawyerTeam(lawyerTeam);
    }

    /**
     * 修改律师
     * 
     * @param lawyerTeam 律师
     * @return 结果
     */
    @Override
    public int updateLawyerTeam(LawyerTeam lawyerTeam)
    {
        lawyerTeam.setUpdateTime(DateUtils.getNowDate());
        return lawyerTeamMapper.updateLawyerTeam(lawyerTeam);
    }

    /**
     * 删除律师对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLawyerTeamByIds(String ids)
    {
        return lawyerTeamMapper.deleteLawyerTeamByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除律师信息
     * 
     * @param id 律师ID
     * @return 结果
     */
    @Override
    public int deleteLawyerTeamById(Long id)
    {
        return lawyerTeamMapper.deleteLawyerTeamById(id);
    }
}
